﻿		public void Insert({ClassName}Data OwnData) //DataAccessClassInsertMethod.tpl
        {
			try
			{
			DateTime startTime = DateTime.Now;
			String Query = "insert into [{TableName}] (" + String.Join(",", CONST_COLUMN_NAMES) + ") values ({ParametersNames})";
			DbParameter[] parameters = new DbParameter[{ParamsCount}];
			for (int i = 0; i < {ParamsCount}; i++)
		        parameters[i] = connector.CreateParameter();
{PropertiesNames}
{CheckIfPrimaryKeyIsSupplied}
			connector.ExecuteNonQuery(Query, parameters);
{AutoGeneratedIdsToDataClassAssignation}			
			logger.Info("Method {ClassName}DAL.Insert took " + (DateTime.Now - startTime).Milliseconds + "ms.");
			}
			catch (Exception e)
			{
				logger.Error("Error Inserting on table [{TableName}]", e);
				throw e;
			}
        }
        
